<html>
	<body>
	<%@ page import="java.sql.*,studentportal.*"%>

 <%
			org.krcc.upload.DiskMultipartRequestHandler file=
			new org.krcc.upload.DiskMultipartRequestHandler();
			file.maxFileSize="1G";
			file.bufferSize=4096;
			file.path="c:";
			file.handleRequest(request,true);
			org.krcc.upload.DiskMultipartRequestHandler mmm=file;
			java.util.Hashtable fref=mmm.getFileElements();
			java.util.Enumeration fenum=null;
			if(fref!=null)
			  fenum=fref.elements();
			String physicalFile=null;
			String logicalFile=null;
			if(fenum!=null && fenum.hasMoreElements()) {
			  org.krcc.upload.DiskFile df=(org.krcc.upload.DiskFile)fenum.nextElement();
					physicalFile=df.getStoredFilePath();
					logicalFile=df.getFileName();
			}
			Connection con1=MySQLDriver.getConnection(); 
			con1.setAutoCommit(false);
			PreparedStatement st1=con1.prepareStatement("insert into faculty_assignment_master(assign_id, assignment_name, assignment_desc, attach_name, date, physical_file, logical_file ) values (?,?,?,?,?,?,?)");
			st1.setString(1,mmm.getParameter("ID"));
			st1.setString(2,mmm.getParameter("NAME"));
			st1.setString(3,mmm.getParameter("ATTNAME"));
			st1.setString(4,mmm.getParameter("DESC"));
			st1.setString(5,mmm.getParameter("DATE"));
			st1.setString(6,physicalFile);
			st1.setString(7,logicalFile);
			int i=st1.executeUpdate();
			if(i==1)
			  con1.commit();
			con1.close();
  %>
		
    <p align="center">&nbsp;</p>
    <p align="center">&nbsp;</p>
    <p align="center"><font size="6" color="#0066FF">Record Has Been
    Successfully Inserted</font></p>
    <p align="center"><a href="FacultyListCourses.jsp">Back</a></p>
	</body>
</html>
